<?php
/**
 * CreateUser: zlh
 * CreateTime: 2022/2/3 14:59
 * Remark:
 */

namespace App\Http\Controllers\Auth;

use App\Consts\BaseConsts\BaseConsts;
use App\Consts\ResponseConsts\ResponseStatusConsts;
use App\Func\ResponseFunc;
use App\Service\Auth\AuthBasicService;

class AuthBasicController extends BaseConsts
{
    private AuthBasicService $_authBasicService;

    public function __construct()
    {
        $this->_authBasicService = new AuthBasicService();
    }

    /**
     * 获取权限列表
     * @return \Illuminate\Http\JsonResponse
     */
    public function getAuthList(): \Illuminate\Http\JsonResponse
    {
        return ResponseFunc::returnJson(
            'ok',
            $this->_authBasicService->getAuthList(),
            '获取权限列表成功',
            ResponseStatusConsts::OK_200_RESPONSE_STATUS
        );
    }
}